package ru.compscicenter.databases.zaikina.common;

import ru.compscicenter.databases.zaikina.common.commands.*;

public abstract class AbstractManagedObject implements ManagedObject {
    public SysCommand process(SysCommand<?, ?> command) {
        if (SysCommandType.isDocumentsCommand(command.getType())) {
            return process((DocumentsCommand) command);
        }

        if (SysCommandType.isEmptyCommand(command.getType())) {
            return process((EmptyCommand) command);
        }

        if (SysCommandType.isFullDocumentsCommand(command.getType())) {
            return process((FullDocumentsCommand) command);
        }

        if (SysCommandType.isFullWordsCommand(command.getType())) {
            return process((FullWordsCommand) command);
        }

        if (SysCommandType.isStringListCommand(command.getType())) {
            return process((StringListCommand) command);
        }

        if (SysCommandType.isWordsCommand(command.getType())) {
            return process((WordsCommand) command);
        }

        return null;
    }

    public SysCommand process(DocumentsCommand command) {
        return null;
    }

    public SysCommand process(EmptyCommand command) {
        return null;
    }

    public SysCommand process(FullDocumentsCommand command) {
        return null;
    }

    public SysCommand process(FullWordsCommand command) {
        return null;
    }

    public SysCommand process(StringListCommand command) {
        return null;
    }

    public SysCommand process(WordsCommand command) {
        return null;
    }

    public abstract AbstractManagedObject clone();

}
